Skip to content

Welcome tab #13407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 45 commits into
base: main
Choose a base branch
from
Open

Welcome tab #13407

wants to merge 45 commits into from

Conversation

Yubo-Cao
Copy link
Contributor

@Yubo-Cao Yubo-Cao commented Jun 29, 2025

Closes #12664

Preview Image

Video

Steps to test

  1. Open JabRef
  2. The improved Welcome Tab should be visible

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user)
  • [/] Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (if change is visible to the user)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@Yubo-Cao
Copy link
Contributor Author

Yubo-Cao commented Jul 3, 2025

Latest update drop:

  1. Add large library optimization, push to application, web search service, and entry table quick settings
  2. Demo:

图片

Demo

@subhramit
Copy link
Member

Preview Image

Looks slick! Well done.

@jabref-machine
Copy link
Collaborator

JUnit tests of jablib are failing. You can see which checks are failing by locating the box "Some checks were not successful" on the pull request page. To see the test output, locate "Tests / Unit tests (pull_request)" and click on it.

You can then run these tests in IntelliJ to reproduce the failing tests locally. We offer a quick test running howto in the section Final build system checks in our setup guide.

Comment on lines 79 to 110
private static List<Path> getCommonPaths() {
List<Path> paths = new ArrayList<>();

if (OS.WINDOWS) {
paths.addAll(List.of(
Path.of("C:/Program Files"),
Path.of("C:/Program Files (x86)"),
Path.of(System.getProperty("user.home"), "AppData/Local"),
Path.of(System.getProperty("user.home"), "AppData/Roaming")
));
} else if (OS.OS_X) {
paths.addAll(List.of(
Path.of("/Applications"),
Path.of("/usr/local/bin"),
Path.of("/opt/homebrew/bin"),
Path.of(System.getProperty("user.home"), "Applications"),
Path.of("/usr/local/texlive"),
Path.of("/Library/TeX/texbin")
));
} else if (OS.LINUX) {
paths.addAll(List.of(
Path.of("/usr/bin"),
Path.of("/usr/local/bin"),
Path.of("/opt"),
Path.of("/snap/bin"),
Path.of(System.getProperty("user.home"), ".local/bin"),
Path.of("/usr/local/texlive")
));
}

return paths;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppDirs package?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Admittedly, this looks very bad... but honestly, I cannot think of a good place to put it. Maybe the Desktop.java can handle more of such a path.

As for Appdirs (https://github.com/harawata/appdirs), I don't think it provides a method where I can get those common software package locations. It's true that maybe I can get the user data path and start just CD around, but at this point I should simply be hardcoding it anyway?

The example output they have here:

User data dir: C:\Users\ave\AppData\Local\harawata\myapp\1.2.3
User data dir (roaming): C:\Users\ave\AppData\Roaming\harawata\myapp\1.2.3
User config dir: C:\Users\ave\AppData\Local\harawata\myapp\1.2.3
User config dir (roaming): C:\Users\ave\AppData\Roaming\harawata\myapp\1.2.3
User cache dir: C:\Users\ave\AppData\Local\harawata\myapp\Cache\1.2.3
User log dir: C:\Users\ave\AppData\Local\harawata\myapp\Logs\1.2.3
User downloads dir: C:\Users\ave\Downloads\harawata\myapp\1.2.3
Site data dir: C:\ProgramData\harawata\myapp\1.2.3
Site data dir (multi path): C:\ProgramData\harawata\myapp\1.2.3
Site config dir: C:\ProgramData\harawata\myapp\1.2.3
Site config dir (multi path): C:\ProgramData\harawata\myapp\1.2.3
Shared dir: C:\ProgramData\harawata\myapp\1.2.3

I figured the best I can achieve based on this is to take the shared directory and user cache directory and start CD-ing?

.computeIfAbsent(key, _ -> createMainFileDirectoryWalkthrough(mainStage));
default ->
throw new IllegalArgumentException("Unknown walkthrough name: " + name);
// This will not crash application. If a new walkthrough is added and the developer tried the walkthrough that was added at least once, any mismatch will be caught here.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment restates what is obvious from the code and doesn't provide additional value or reasoning. Such comments should be removed.

Copy link
Contributor Author

@Yubo-Cao Yubo-Cao Jul 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume if I remove this, you will say throwing an exception is discouraged and may interrupt the application...

Comment on lines +21 to +24
@Inject private GuiPreferences preferences;
@Inject private DialogService dialogService;
@Inject private TaskExecutor taskExecutor;
@Inject private ThemeManager themeManager;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Injected fields should be final to prevent accidental modification after initialization, following effective Java principles.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I could make this final without initializing this to null in the constructor?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depends on how afterburner works. Please look for other places in code where this happen.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, cannot be final

helpButton.setHelpPage(URLs.PUSH_TO_APPLICATIONS_DOC);
}

private void updatePathValidation(String newText) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method handles GUI validation logic directly in the dialog class instead of delegating to the ViewModel, violating the separation of concerns principle.

Comment on lines +92 to +94
public @NonNull String getGrobidUrl() {
return grobidUrlProperty.get();
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method returns direct property value which could be null, contradicting @nonnull annotation. Should include null check or use Optional to properly handle potential null values.

@jabref-machine
Copy link
Collaborator

JUnit tests of jablib are failing. You can see which checks are failing by locating the box "Some checks were not successful" on the pull request page. To see the test output, locate "Tests / Unit tests (pull_request)" and click on it.

You can then run these tests in IntelliJ to reproduce the failing tests locally. We offer a quick test running howto in the section Final build system checks in our setup guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve welcome page
5 participants